package com.candy.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class News {
    private Integer id;

    private String title;

    private String author;
//@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS",timezone = "GMT+8")
//@DateTimeFormat(pattern = "yyyy-MM-dd HHmmss")
//@JsonFormat(locale="zh",pattern= "yyyy-MM-dd'T'HH:mm:ss'.000Z'",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date time;

    private Integer isdeleted;

    private String context;

    public News(Integer id, String title, String author, Date time, Integer isdeleted, String context) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.time = time;
        this.isdeleted = isdeleted;
        this.context = context;
    }

    public News() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author == null ? null : author.trim();
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Integer isdeleted) {
        this.isdeleted = isdeleted;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context == null ? null : context.trim();
    }
}